<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE HTML>
<html>
<head>
    <title>后台管理系统</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="/resources/css/dpl-min.css" rel="stylesheet" type="text/css" />
    <link href="/resources/css/bui-min.css" rel="stylesheet" type="text/css" />
    <link href="/resources/css/page-min.css" rel="stylesheet" type="text/css" />
</head>
<body>

<div class="container">
    <form id="J_Form" class="form-horizontal" action="/memberAmount/changeAmount">
        <h3>代理商信息</h3>
        <input type="hidden" name="userId" id="userId" value="${data.id}"/>
        <input type="hidden" name="id" id="id" value="${money.id}"/>
        <div class="row">
            <div class="control-group span12">
                <label class="control-label">代理商ID：</label>
                <div style="display:inline;height:40px;margin-left: 10px;">
                    ${data.account}
                </div>
            </div>

            <div class="control-group span12">
                <label class="control-label">微信昵称：</label>
                <div style="display:inline;height:40px;margin-left: 10px;">
                    ${data.nickName}
                </div>
            </div>
        </div>

        <div class="row">
            <div class="control-group span12">
                <label class="control-label">代理商类型：</label>
                <div style="display:inline;height:40px;margin-left: 10px;">
                    <c:choose>
                        <c:when test="${data.type eq 'Gold'}">金牌代理商</c:when>
                        <c:when test="${data.type eq 'General'}">全国总代</c:when>
                        <c:when test="${data.type eq 'Parnter'}">区域合伙人</c:when>
                        <c:otherwise>普通消费者</c:otherwise>
                    </c:choose>
                </div>
            </div>

        </div>


        <h3>资金信息</h3>
        <div class="row">
            <div class="control-group span12">
                <label class="control-label">现金余额：</label>
                <div style="display:inline;height:40px;margin-left: 10px;">
                    ${money.cash}
                </div>
            </div>

            <div class="control-group span12">
                <label class="control-label">购物余额：</label>
                <div style="display:inline;height:40px;margin-left: 10px;">
                    ${money.bonus}
                </div>
            </div>
        </div>


        <div class="row">
            <div class="control-group span20">
                <label class="control-label">冻结资金：</label>
                <div style="display:inline;height:40px;margin-left: 10px;">
                    ${money.frozenAmount}
                </div>
            </div>
        </div>

        <h3>调整资金</h3>

        <div class="row">
            <div class="control-group span20">
                <label class="control-label">调整后的现金余额：</label>
                <div style="display:inline;height:40px;margin-left: 10px;">
                    <input type="text" name="cash" id="cash"  data-rules="{required:true,min:0,number:true}" value="${money.cash}"/>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="control-group span20">
                <label class="control-label">调整后的购物余额：</label>
                <div style="display:inline;height:40px;margin-left: 10px;">
                    <input type="text" name="bonus" id="bonus"  data-rules="{required:true,min:0,number:true}" value="${money.bonus}"/>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="control-group span20">
                <label class="control-label">调整后的冻结余额：</label>
                <div style="display:inline;height:40px;margin-left: 10px;">
                    <input type="text" name="frozenAmount" id="frozenAmount"  data-rules="{required:true,min:0,number:true}" value="${money.frozenAmount}"/>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="control-group span20">
                <label class="control-label">备注：</label>
                <div style="display:inline;height:40px;margin-left: 10px;">
                    <input type="text" name="remark" id="remark"  data-rules="{maxlength:50}" style="width:220px;"/>
                </div>
            </div>
        </div>


        <div class="row form-actions actions-bar">
            <div class="span13 offset3 ">
                <button type="submit" class="button button-primary">确定</button>
                <button type="button" class="button" onclick="back()">返回</button>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript" src="/resources/js/jquery-1.8.1.min.js"></script>
<script type="text/javascript" src="/resources/js/sea.js"></script>
<script type="text/javascript" src="/resources/js/bui-min.js"></script>
<script type="text/javascript" src="/resources/js/config-min.js"></script>


<script type="text/javascript">
    BUI.use('common/page'); //页面链接跳转
    BUI.use(['bui/tree','bui/form','bui/select','bui/data'],function (Tree,Form,Select,Data) {

        var form = new Form.HForm({
            srcNode : '#J_Form',
            submitType:"ajax",
            listeners:{
                beforesubmit:function(){

                    return true;
                }
            },
            callback:function(data){
                BUI.Message.Alert(data.msg,function(){
                    if(data.success){
                        back();
                    }
                },'info');
            }
        });

        form.render();
    });

    function back(){
        top.topManager.openPage({
            id : 'user_amount_list',
            isClose : true
        });
        top.topManager.reloadPage('user_amount_list');
    }


</script>

</body>
</html> 